package net.dgg.iboss.sc.backservice.task.service;


import net.dgg.iboss.sc.backservice.task.dao.SystemRecordDao;
import net.dgg.iboss.sc.backservice.task.entity.SystemRecord;
import net.fblock.core.common.KeyWorker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;

/**
 * 系统操作日志Service
 *
 * @Author:HDC
 * @Date: Created in 2018/8/14 16:51
 * @Copyright © dgg group.All Rights Reserved. 版权信息
 */
@Service
public class SystemRecordService {

    @Autowired
    private SystemRecordDao systemRecordDao;


    /**
     * 保存
     *
     * @param systemRecord 操作日志实体
     */
    @Transactional
    public void apiSave(SystemRecord systemRecord) {
        systemRecord.setId(KeyWorker.nextId());
        systemRecord.setOperaterId(1L);
        systemRecord.setOperaterName("超级管理员");
        systemRecord.setOperaterOrgId(1L);
        systemRecord.setOperaterOrgName("");

        systemRecord.setOperateTime(new Date());
        systemRecordDao.insert(systemRecord);
    }


}
